<?php

namespace App\Composers;

use Illuminate\View\View;
use Request, Route;

class GuardComposer
{

    private $data, $title;

    protected $navbar = array();

    public function __construct() 
    {
        $this->data = new MenuComposer();

        $this->title = 'messages.'.Route::currentRouteName();
        
    }


    public function compose(View $view) 
    {
        $view->with([
            'menus' => $this->data->getMenus(),
            'title' => $this->title,
        ]);
    }
    
}